package com.hzhjhh.view.manageView.menus.accountMng;

import javax.swing.*;

import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.CancelBt;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.CardId;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.CardOpenDate;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.CardOwner;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.Discount;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.IDCard;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.Password;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.QueryBt;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.Remark;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.Score;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.Term;
import com.hzhjhh.view.manageView.menus.accountMng.accountQuery.UserType;

import lombok.Getter;
import lombok.Setter;

import java.awt.*;

/**
 * 菜单栏初始化-账户管理-个人账户查询弹出框
 * 
 * @author 12083
 *
 */
@Getter
@Setter
public class AccountQueryDialog extends JDialog {
	JPanel panel1 = new JPanel();
	JTextField txfCardId = new JTextField();
	JTextField txfCardOwner = new JTextField();
	JTextField txfIDCard = new JTextField();
	JTextField txfPassword = new JTextField();
	JTextField txfDiscount = new JTextField();
	JLabel lbCardId = new JLabel();
	JLabel lbCardOwner = new JLabel();
	JLabel lbIDCard = new JLabel();
	JLabel jLabel4 = new JLabel();
	JLabel lbDiscount = new JLabel();
	JTextField txfTerm = new JTextField();
	JTextField txfScore = new JTextField();
	JTextArea txaRemark = Remark.txaInit();
	JLabel lbUserType = new JLabel();
	JLabel lbTerm = new JLabel();
	JLabel lbScore = new JLabel();
	JTextField txfCardOpenDate = new JTextField();
	JLabel lbCardOpenDate = new JLabel();
	JLabel lbRemark = new JLabel();
	JScrollPane jScrollPane1 = new JScrollPane();
	JButton btCancel = new JButton();
	JComboBox cobUserType = new JComboBox();
	JButton btQuery = new JButton();

	public AccountQueryDialog(Frame owner, String title, boolean modal) {
		super(owner, title, modal);
		try {
			setDefaultCloseOperation(DISPOSE_ON_CLOSE);
			jbInit();
			pack();
		} catch (Exception exception) {
			exception.printStackTrace();
		}
	}

	public AccountQueryDialog() {
		this(new Frame(), "注册用户", false);
		this.setSize(500, 400);
		this.setLocation(300, 200);
		this.setVisible(true);
		this.setTitle("个人账户查询");
	}

	private void jbInit() throws Exception {

		panel1.setLayout(null);
		txfCardId = CardId.txfInit();
		txfCardOwner = CardOwner.txfInit();
		txfIDCard = IDCard.txfInit();
		txfPassword = Password.psInit();
		txfDiscount = Discount.txfInit();
		lbCardId = CardId.lbInit();
		lbCardOwner = CardOwner.lbInit();
		lbIDCard = IDCard.lbInit();
		jLabel4.setText("级别");
		jLabel4.setBounds(51, 173, 42, 15);
		lbDiscount = Discount.lbInit();
		txfTerm = Term.txfInit();
		txfScore = Score.txfInit();
		lbUserType = UserType.lbInit();
		lbTerm = Term.lbInit();
		lbScore = Score.lbInit();
		txfCardOpenDate = CardOpenDate.txfInit();
		lbCardOpenDate = CardOpenDate.lbInit();
		lbRemark = Remark.lbInit();
		jScrollPane1.setBounds(308, 210, 105, 82);
		btCancel = CancelBt.btInit(this);
		panel1.setBackground(Color.pink);
		cobUserType = UserType.cobInit();
		btQuery = QueryBt.btInit(this);
		
		panel1.add(txfIDCard);
		panel1.add(txfCardId);
		panel1.add(txfCardOwner);
		panel1.add(lbCardId);
		panel1.add(lbCardOwner);
		panel1.add(lbIDCard);
		panel1.add(jLabel4);
		panel1.add(lbTerm);
		panel1.add(lbScore);
		panel1.add(lbRemark);
		panel1.add(lbUserType);
		panel1.add(lbCardOpenDate);
		panel1.add(lbDiscount);
		panel1.add(txfPassword);
		panel1.add(txfDiscount);
		panel1.add(txfTerm);
		panel1.add(txfScore);
		panel1.add(txfCardOpenDate);
		panel1.add(jScrollPane1);
		panel1.add(cobUserType);
		panel1.add(btCancel);
		panel1.add(btQuery);
		jScrollPane1.getViewport().add(txaRemark);
		this.getContentPane().add(panel1, BorderLayout.CENTER);
	}

}
